package cn.bisoft.java.bean.entity;

import java.io.Serializable;



/**
 * This is an object that contains data related to the AnteRequestLog table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="AnteRequestLog"
 */

public abstract class BaseAnteRequestLog  implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	public static String REF = "AnteRequestLog";
	public static String PROP_MESSAGE_ID = "messageId";
	public static String PROP_STATE = "state";
	public static String PROP_RECEIVE_TIME = "receiveTime";
	public static String PROP_SEND_TIME = "sendTime";
	public static String PROP_SEQ_NO = "seqNo";
	public static String PROP_COUNTER_I_D = "counterID";
	public static String PROP_TRANS_TYPE = "transType";
	public static String PROP_RESPONSE_CODE = "responseCode";


	// constructors
	public BaseAnteRequestLog () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAnteRequestLog (java.lang.Long seqNo) {
		this.setSeqNo(seqNo);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseAnteRequestLog (
		java.lang.Long seqNo,
		java.lang.Integer transType,
		java.lang.String messageId,
		java.lang.String counterID,
		java.util.Date sendTime,
		java.util.Date receiveTime,
		java.lang.Integer state) {

		this.setSeqNo(seqNo);
		this.setTransType(transType);
		this.setMessageId(messageId);
		this.setCounterID(counterID);
		this.setSendTime(sendTime);
		this.setReceiveTime(receiveTime);
		this.setState(state);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long seqNo;

	// fields
	private java.lang.Integer transType;
	private java.lang.String messageId;
	private java.lang.String counterID;
	private java.util.Date sendTime;
	private java.util.Date receiveTime;
	private java.lang.Integer state;
	private java.lang.String responseCode;
	private java.util.Date updateTime;

	public java.util.Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(java.util.Date finishTime)
	{
		this.updateTime = finishTime;
	}

	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="SeqNo"
     */
	public java.lang.Long getSeqNo () {
		return seqNo;
	}

	/**
	 * Set the unique identifier of this class
	 * @param seqNo the new ID
	 */
	public void setSeqNo (java.lang.Long seqNo) {
		this.seqNo = seqNo;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: TransType
	 */
	public java.lang.Integer getTransType () {
		return transType;
	}

	/**
	 * Set the value related to the column: TransType
	 * @param transType the TransType value
	 */
	public void setTransType (java.lang.Integer transType) {
		this.transType = transType;
	}



	/**
	 * Return the value associated with the column: MessageId
	 */
	public java.lang.String getMessageId () {
		return messageId;
	}

	/**
	 * Set the value related to the column: MessageId
	 * @param messageId the MessageId value
	 */
	public void setMessageId (java.lang.String messageId) {
		this.messageId = messageId;
	}



	/**
	 * Return the value associated with the column: CounterID
	 */
	public java.lang.String getCounterID () {
		return counterID;
	}

	/**
	 * Set the value related to the column: CounterID
	 * @param counterID the CounterID value
	 */
	public void setCounterID (java.lang.String counterID) {
		this.counterID = counterID;
	}



	/**
	 * Return the value associated with the column: SendTime
	 */
	public java.util.Date getSendTime () {
		return sendTime;
	}

	/**
	 * Set the value related to the column: SendTime
	 * @param sendTime the SendTime value
	 */
	public void setSendTime (java.util.Date sendTime) {
		this.sendTime = sendTime;
	}



	/**
	 * Return the value associated with the column: ReceiveTime
	 */
	public java.util.Date getReceiveTime () {
		return receiveTime;
	}

	/**
	 * Set the value related to the column: ReceiveTime
	 * @param receiveTime the ReceiveTime value
	 */
	public void setReceiveTime (java.util.Date receiveTime) {
		this.receiveTime = receiveTime;
	}



	/**
	 * Return the value associated with the column: State
	 */
	public java.lang.Integer getState () {
		return state;
	}

	/**
	 * Set the value related to the column: State
	 * @param state the State value
	 */
	public void setState (java.lang.Integer state) {
		this.state = state;
	}



	/**
	 * Return the value associated with the column: ResponseCode
	 */
	public java.lang.String getResponseCode () {
		return responseCode;
	}

	/**
	 * Set the value related to the column: ResponseCode
	 * @param responseCode the ResponseCode value
	 */
	public void setResponseCode (java.lang.String responseCode) {
		this.responseCode = responseCode;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof AnteRequestLog)) return false;
		else {
			AnteRequestLog anteRequestLog = (AnteRequestLog) obj;
			if (null == this.getSeqNo() || null == anteRequestLog.getSeqNo()) return false;
			else return (this.getSeqNo().equals(anteRequestLog.getSeqNo()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getSeqNo()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getSeqNo().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}